﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NaireSystem.Api.Dto;
using NaireSystem.Datas;
using TYBase;

namespace NaireSystem.Api
{
    public class ExamDeptApi
    {
        public static R<List<TestDeptVO>> GetListByTestUuid(string testUuid)
        {
            try
            {
                LocalHttp http = new LocalHttp();
                if (!http.SetBaseUri(AppData.Url)
                    .SetUrl($"/testDept/getListByTestUuid?testUuid={testUuid}")
                    .SetGet().Excute(out string data))
                {
                    return R<List<TestDeptVO>>.Fail(data);
                }
                return data.AsModel<R<List<TestDeptVO>>>();
            }
            catch (Exception ex)
            {
                return R<List<TestDeptVO>>.Fail("获取数据失败!", ex);
            }
        }

    }
}
